package cn.stylefeng.guns.core.util;

import java.util.Random;

/**
 * @Author: Xiazt
 * @Date: 2019-06-20 14:56
 */
public class RandomUtil {

    public static Integer getRandomNumber(){
        final double random = Math.random();
        final int i = (int) (random * 10);
        return i + 1;
    }

    public static int getRandomPopularity() {
        int min = 1500;
        int max = 7500;
        Random random = new Random();
        return random.nextInt(max) % (max - min + 1) + min;
    }

    public static Integer getRandom(Integer min,Integer max){
        Random random = new Random();
        return random.nextInt(max) % (max - min + 1) + min;
    }
}
